/* 组件样式增强 - 轻松明快版 */

/* 通用卡片样式 */
.card-container {
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  overflow: hidden;
  background-color: #ffffff;
}

.card-container:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* 联系人列表项样式 */
.contact-item {
  transition: all 0.2s ease;
  border-radius: 8px;
  margin: 4px 0;
  padding: 10px;
}

.contact-item:hover {
  background-color: rgba(126, 217, 87, 0.1);
  transform: translateX(4px);
}

.contact-item.active {
  background-color: rgba(126, 217, 87, 0.2);
  border-left: 3px solid #7ed957;
}

/* 头像样式增强 */
.avatar-container {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.avatar-container:hover {
  transform: scale(1.05);
}

/* 按钮动画效果 */
.animated-button {
  position: relative;
  overflow: hidden;
}

.animated-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.animated-button:hover::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  20% {
    transform: scale(25, 25);
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: scale(40, 40);
  }
}

/* 输入框焦点动画 */
.animated-input {
  transition: all 0.3s ease;
}

.animated-input:focus {
  transform: translateY(-2px);
}

/* 菜单项动画 */
.menu-item {
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.menu-item:hover {
  background-color: rgba(126, 217, 87, 0.1);
  border-left: 3px solid #7ed957;
  padding-left: 16px;
}

/* 加载动画 */
.loading-spinner {
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top: 3px solid #7ed957;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 消息时间戳样式 */
.message-timestamp {
  font-size: 11px;
  color: rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.message-bubble:hover .message-timestamp {
  opacity: 1;
}

/* 未读消息标记 */
.unread-badge {
  background-color: #ff6b6b;
  color: white;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(255, 107, 107, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0);
  }
}

/* 页面切换动画 */
.page-transition-enter {
  opacity: 0;
  transform: translateY(20px);
}

.page-transition-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 300ms, transform 300ms;
}

.page-transition-exit {
  opacity: 1;
  transform: translateY(0);
}

.page-transition-exit-active {
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 300ms, transform 300ms;
}

/* 登录页面样式增强 */
.login-container {
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.login-container:hover {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  transform: translateY(-5px);
}

/* QR码容器样式 */
.qrcode-container {
  padding: 16px;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.qrcode-container:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}